#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
void* my_memmove(void*dest, const void* sur ,size_t num)
{
	void* ret = dest;
	if(dest<sur)
	{
		while(num--)
		{
			*(char*)dest = *(char*)sur;
			dest = (char*)dest + 1;
			sur = (char*)sur + 1;
		}
	    
	}
	else
	{
		while(num--)
		{
          *((char*)dest + num) = *((char*)sur + num);
		}
		
	}
	return ret;
	
}
int main()
{
	int arr[] = { 1,2,3,4,5,6,7,8,9,10 };
	my_memmove(arr + 2, arr, 20);
	for(int i=0;i<10;i++)
	{
       printf("%d ", arr[i]);
	}
	
	return 0;
}

